package com.shiminghui;

import java.util.Scanner;

public class QiuZhiShu {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();

        //判断质数,(否则和数.)

        int flag = 0;

        for (int i=2;i<=Math.sqrt(a);i++){
            System.out.println(i);
            if (a%i==0){
                System.out.println("和数");
                flag = 1;
                break;
            }

        }
        if (flag==0){
            System.out.println("质数");
        }

    }
}
